//         for (var i = 0; i < res.length; i++)

define(() => {
    return function(res, ele){
        let str = "";
        res.forEach(val => {
            str += `<li class="goods-item fl" id="${val.proId}">
                        <a href="./Details.html?id=${val.proId}">
                            <div class="figure-img">
                                <img src="${val.proImg}" alt="">
                            </div>
                            <h2 class="title">${val.name}</h2>
                            <p class="price">
                                <span>${val.price}元</span>
                            </p>
                            <div class="thumbs">
                                <img src="${val.proImg}" alt="" style="width: 34px;height: 34px;">
                            </div>
                        </a>
                    </li>`
        })
        ele.innerHTML = str;
    }
});